From a98d28611e845e753e4a817650da0996f3236806 Mon Sep 17 00:00:00 2001
From: Mqdd <ahmadmiqdad27@gmail.com>
Date: Wed, 19 Nov 2025 10:08:46 +0700
Subject: <Miqdad> shop find canonical

---
 src/pages/shop/find/[slug].jsx | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'src/pages/shop/find/[slug].jsx')

diff --git a/src/pages/shop/find/[slug].jsx b/src/pages/shop/find/[slug].jsx
index 268b1e56..e5160002 100644
--- a/src/pages/shop/find/[slug].jsx
+++ b/src/pages/shop/find/[slug].jsx
@@ -22,9 +22,13 @@ export default function FindPage() {
   const [result, setResult] = useState(null);
   const [query, setQuery] = useState(null);
 
-  const __slug = qSlug ? getNameFromSlug(route?.query?.slug) +' '+ getIdFromSlug(route?.query?.slug) : '';
+  const __slug = qSlug
+    ? getNameFromSlug(route?.query?.slug) +
+      ' ' +
+      getIdFromSlug(route?.query?.slug)
+    : '';
   const slug = capitalizeEachWord(__slug);
-  
+
   const getUrls = async (url) => {
     try {
       let response = await axios(
@@ -59,9 +63,11 @@ export default function FindPage() {
           {
             property: 'keywords',
             content: `Beli  ${slug}, harga ${slug}, ${slug} murah, toko ${slug}, ${slug} jakarta, ${slug} surabaya`,
-
           },
         ]}
+        canonical={`${process.env.NEXT_PUBLIC_SELF_HOST}${
+          route.asPath.split('?')[0]
+        }`}
       />
       {query && <ProductSearch query={query} prefixUrl={`${route.asPath}`} />}
     </BasicLayout>
-- 
cgit v1.2.3

